package cn.juque.systemservice.jobhandler;

import cn.juque.common.abstracts.AbstractXxlJobHandler;
import cn.juque.systemservice.task.LocalCacheTask;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author juque
 * @version 1.0.0
 * <ul>
 *     <li>GenInfoDispatch</li>
 * </ul>
 * @date 2023-01-25 09:34:01
 **/
@Slf4j
@Component
public class LocalCacheJobHandler extends AbstractXxlJobHandler {

    @Resource
    private LocalCacheTask localCacheTask;

    /**
     * 开始执行
     */
    @XxlJob("localCacheJobHandler")
    @Override
    public void start() {
        super.start();
    }

    /**
     * 业务具体实现
     *
     * @return 消息描述
     */
    @Override
    protected String run() {
        this.localCacheTask.execute();
        return null;
    }
}
